Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: bsp_k230Reviewers: unicornx Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-12-26 11:55 CST)
📝 Review Instructions
|
bsp/k230/board/Kconfig
Outdated
| menu "Drivers Configuration" | ||
|
|
||
| config BSP_USING_GNNE | ||
| bool "Enable GNNE" |
There was a problem hiding this comment.
建议在标题中不要用 GNNE 的缩写,用全称比较好理解
There was a problem hiding this comment.
嘉楠的手册中似乎没用对gnne的全称,gnne这个名称和kpu是混用的,他们的Memory Map地址也是同一个,要不我直接在标题中说明一下包含KPU和AI2D?
| g_ai2d_lock = HARDLOCK_AI2D; | ||
| } | ||
|
|
||
| #ifndef RT_FASTBOOT |
There was a problem hiding this comment.
RT_FASTBOOT 这是一个新引入的宏,但是没有看到可以定义的地方,请确认是否需要?
There was a problem hiding this comment.
RTT for CanMV Upstream Plan这个表里面提到了RT_FASTBOOT这个宏(938e5a0 bsp: k230: enable FASTBOOT),似乎是未来准备加上的功能,老师您看在驱动中是否有必要保留对fastboot的支持,还是直接删除
There was a problem hiding this comment.
这个 FASTBOOT 功能以前问过,记得不是一个必需的,先不加了,以后确定了再加。
| { | ||
| g_kpu_lock = HARDLOCK_KPU; | ||
| } | ||
| #ifndef RT_FASTBOOT |
There was a problem hiding this comment.
RT_FASTBOOT 这是一个新引入的宏,但是没有看到可以定义的地方,请确认是否需要?
| .poll = ai_2d_device_poll, | ||
| }; | ||
|
|
||
| #define IRQN_AI2D_INTERRUPT (16 + 175) |
There was a problem hiding this comment.
bsp/k230/board/irq_num.h 里已经统一定义了所有的 IRQ#,请使用统一的定义。
| .poll = gnne_device_poll, | ||
| }; | ||
|
|
||
| #define IRQN_GNNE_INTERRUPT (16 + 173) |
There was a problem hiding this comment.
bsp/k230/board/irq_num.h 里已经统一定义了所有的 IRQ#,请使用统一的定义。
| } | ||
|
|
||
| rt_wqueue_init(&ai_2d_device->wait_queue); | ||
| rt_hw_interrupt_install(IRQN_AI2D_INTERRUPT, irq_callback, &ai_2d_device->wait_queue, "ai_2d_irq"); |
There was a problem hiding this comment.
rt_hw_interrupt_install 该函数可能失败,需要判断返回值。
| } | ||
|
|
||
| rt_wqueue_init(&gnne_device->wait_queue); | ||
| rt_hw_interrupt_install(IRQN_GNNE_INTERRUPT, irq_callback, &gnne_device->wait_queue, "gnne_irq"); |
There was a problem hiding this comment.
rt_hw_interrupt_install 该函数可能失败,需要判断返回值。
df25c9d to
ffe39f1
Compare
Requirement: The BSP for the k230 platform in the RT-Thread repository does not yet have a gnne driver. Solution: Provide gnne driver for the k230 platform in the RT-Thread repository. - Implements mutex lock mechanism for AI2D and GNNE modules. - Adds HARDLOCK_AI2D support in hardlock driver for mutual exclusion. - Implements poll operation for device status monitoring. - Updates documentation in bsp/README.md. Signed-off-by: ChuanN-sudo <fjchuanil@gmail.com>
ffe39f1 to
d61c236
Compare
|
@Rbb666 请 review & merge if LGTY |
Requirement: The BSP for the k230 platform in the RT-Thread repository does not yet have a gnne driver.
Solution: Provide gnne driver for the k230 platform in the RT-Thread repository.
Signed-off-by: ChuanN-sudo fjchuanil@gmail.com
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
为K230添加gnne驱动
你的解决方案是什么 (what is your solution)
添加gnne驱动
请提供验证的bsp和config (provide the config and bsp)
BSP:/bsp/k230/drivers/interdrv/gnne
.config:
action:
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up